{include file="public/header" /}
<blockquote class="layui-elem-quote">
    编辑
</blockquote>
<form class="layui-form layui-form-pane kllxs-form" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">类别</label>
        <div class="layui-input-inline">
            <select name="category">
                <option value="无类别" {$find.category=="无类别" ?"selected":""}>无类别</option>
                <option value="类别1" {$find.category=="类别1" ?"selected":""}>类别1</option>
                <option value="类别2" {$find.category=="类别2" ?"selected":""}>类别2</option>
                <option value="类别3" {$find.category=="类别3" ?"selected":""}>类别3</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" autocomplete="off" placeholder="请输入名称" class="layui-input"
                value="{$find.name}">
        </div>
    </div>
    <div class="layui-form-item">
        <button class="layui-btn" lay-submit lay-filter="kllxs-submit">确认</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
</form>
{include file="public/footer" /}
<script>
    layui.use(["form", "popup"], function () {
        var form = layui.form;
        var popup = layui.popup;

        form.on('submit(kllxs-submit)', function (data) {
            var field = data.field; // 获取表单全部字段值

            popup.formSubmit("", field)

            return false; // 阻止默认 form 跳转
        })
    })
</script>